<style>
.fui-goods-item .image .playbtn {
    position: absolute;
	height:auto;
    right: 0.3rem;
    bottom: 0.05rem;
    z-index: 9;
    text-align: center;
    color: #fff;
}
.fui-goods-item {
	padding:0.2rem 0.5rem;
    border-bottom: 0 solid #e7e7e7;
}
.video-group .fui-cell .fui-cell-label:before{
	content: '';
    position: absolute;
    width:0.2rem;
    height:0.6rem;
    background:red;
    left:0;
	top:-0.33rem;
}
</style>
<div ng-if="pagedata.list" class="fui-cell-group fui-cell-click mod-group">
		<div class="fui-cell">
				<div class="fui-cell-label" style="width:6rem">
					<div class="text bold">商品名称</div>
				</div>
				<div class="fui-cell-info" style="padding-right:0.5rem">
					<div class="text bold">供应商</div>
				</div>
				<div class="fui-cell-remark noremark">
					<div class="text bold c" style="color: #888;">报价</div>
				</div>
		</div>
		<div ng-repeat="(key,item) in pagedata.list">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:6rem">
						<div class="text bold" style="color:#5cb85c">{{item.title}}</div>
					</div>
					<div class="fui-cell-info">
					</div>
					<div class="fui-cell-remark noremark" style="color:#5cb85c">
						{{item.list.length}}家
					</div>
				</div>
				<div ng-repeat="g in item.list" class="fui-cell">
					<div class="fui-cell-label" style="width:6rem">
						<div class="gray">{{g.title}}</div>
						<div ng-if="g.optiontitle" class="fui-tag fui-tag-red" style="background:#b3b3b3">{{g.optiontitle}}</div>
					</div>
					<div class="fui-cell-info" style="font-size:0.6rem;padding-right:0.5rem">
						<div class="text overflow-h">{{g.brand}}</div>
						<div ng-if="g.merch.pcd.city" class="text overflow-h red">{{g.merch.pcd.city}}</div>
						<div class="gray">距离:{{g.juli || 0.00}}km</div>
						<div class="gray">{{g.likes || 0}}次收藏</div>
					</div>
					<div class="fui-cell-remark noremark">
						<div ng-if="g.canlook==1" class="text bold red">{{g.price}}/{{g.unit || '件'}}</div>
						<div ng-if="g.canlook!=1" href="javascript:" ng-click="pagedata.kango(g.id,key,$index);" class="jylabel jylabel-success" style="color:red;border: 1px solid red;padding:0.15rem 0.3rem;border-radius:1rem;font-weight:400">看报价</div>
						<div class="gray" style="font-size:0.6rem">{{g.readnum || 0}}次看价</div>
						<div ng-if="g.canlook==1" href="javascript:;" ng-click="pagedata.setlike(g.id);toogle(g,'islike',[1,0])" class="jylabel jylabel-success" style="padding:0.15rem 0.3rem;border-radius:1rem;font-weight:400">{{g.islike!=1?'收藏':'取消收藏'}}</div>
						<div ng-if="g.canlook==1" class="gray overflow-h" style="font-size:0.6rem;">{{g.merchname}}</div>
					</div>
				</div>
				<div id="containerId"></div>
		</div>
		<div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0" style="margin:1rem;">
			<i class='icon icon-chakanpingjia' style="font-size:1.5rem"></i><br/>暂时没有商品报价!
		</div>
</div>
<div class="popup" ng-if="pagedata.showtype">
	<div class="popup-body">
		<div class="popup-center" style="padding:1rem;">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showtype=false"></i>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.totype1()">付金币看价({{pagedata.pluginset.kan_bfee || 0}}个)</div>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.showad=true">看广告看价</div>
			<div class="weui_btn weui_btn_primary" ng-click="pagedata.totype3()">付费看价(￥{{pagedata.pluginset.kan_price ||'0.00'}})</div>
		</div>
	</div>
</div>
<script>
//滚动加载
// 百度地图API功能
window.scope.location(function(re){
	scope.pagedata.params.lng=re.lat_lng.lng
	scope.pagedata.params.lat=re.lat_lng.lat
	scope.tool.get_list('jy_shopbaojia/index/getlist/isall=1',true);
});
scope.tool.get_list('jy_shopbaojia/index/getlist/isall=1',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_shopbaojia/index/getlist/isall=1');
}
scope.pagedata.totype1=function(listid){
	listid =listid?listid:scope.pagedata.listid
	scope.confirm({
			'message':'确认要花'+scope.pagedata.pluginset.kan_bfee+'个金币看报价吗？',
			'success':function(){
				scope.post({},'/index/fub/listid='+listid)
			},
			'fail':function(){}
	});
}
scope.pagedata.totype3=function(listid){
	listid =listid?listid:scope.pagedata.listid
	scope.post_json('/list/pay/',{'listid':listid},function(result){
				scope.pagedata.order_id=result.order_id;
				var success_url='reload';
				scope.$evalAsync();
				scope.tool.pay(result.pay_id,function(res){
						if(res.type=='success'){
							scope.message('支付成功！','success',success_url);
						}else{
							scope.message('支付失败！','success',error_url);
						}
				},'','',success_url);
	});
}
scope.pagedata.kango=function(listid,index,goodsindex){
	scope.pagedata.listid=listid;
	scope.pagedata.listindex=index;
	scope.pagedata.goodsindex=goodsindex;
   if(scope.pagedata.pluginset.kan_type==1){
		scope.pagedata.totype1(listid);
   }else if(scope.pagedata.pluginset.kan_type==2){
		scope.pagedata.showad=true;
		scope.$evalAsync();
   }else if(scope.pagedata.pluginset.kan_type==3){
		scope.pagedata.totype3(listid);
   }else if(scope.pagedata.pluginset.kan_type==4){
		scope.pagedata.showtype=true;
		scope.$evalAsync();
   }else{
		scope.message('免费查看！','error');
   }
}
//获取收藏
scope.pagedata.setlike=function(listid){
	scope.post_json('jy_shopbaojia/index/setlike/id='+listid,{},function(res){
		scope.message(res)
	});
}
</script>